/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package entity;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class UtenteDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression ID;
	public final StringExpression username;
	public final StringExpression password;
	public final StringExpression avatar;
	public final StringExpression nickname;
	public final StringExpression nome;
	public final StringExpression cognome;
	public final LongExpression data_nascita;
	public final StringExpression classe_utenza;
	public final StringExpression citta;
	public final StringExpression indirizzo;
	public final StringExpression outgoing_mail_server;
	public final StringExpression incoming_mail_serve;
	public final IntegerExpression outgoing_port;
	public final IntegerExpression incoming_port;
	
	public UtenteDetachedCriteria() {
		super(entity.Utente.class, entity.UtenteCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		username = new StringExpression("username", this.getDetachedCriteria());
		password = new StringExpression("password", this.getDetachedCriteria());
		avatar = new StringExpression("avatar", this.getDetachedCriteria());
		nickname = new StringExpression("nickname", this.getDetachedCriteria());
		nome = new StringExpression("nome", this.getDetachedCriteria());
		cognome = new StringExpression("cognome", this.getDetachedCriteria());
		data_nascita = new LongExpression("data_nascita", this.getDetachedCriteria());
		classe_utenza = new StringExpression("classe_utenza", this.getDetachedCriteria());
		citta = new StringExpression("citta", this.getDetachedCriteria());
		indirizzo = new StringExpression("indirizzo", this.getDetachedCriteria());
		outgoing_mail_server = new StringExpression("outgoing_mail_server", this.getDetachedCriteria());
		incoming_mail_serve = new StringExpression("incoming_mail_serve", this.getDetachedCriteria());
		outgoing_port = new IntegerExpression("outgoing_port", this.getDetachedCriteria());
		incoming_port = new IntegerExpression("incoming_port", this.getDetachedCriteria());
	}
	
	public UtenteDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, entity.UtenteCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		username = new StringExpression("username", this.getDetachedCriteria());
		password = new StringExpression("password", this.getDetachedCriteria());
		avatar = new StringExpression("avatar", this.getDetachedCriteria());
		nickname = new StringExpression("nickname", this.getDetachedCriteria());
		nome = new StringExpression("nome", this.getDetachedCriteria());
		cognome = new StringExpression("cognome", this.getDetachedCriteria());
		data_nascita = new LongExpression("data_nascita", this.getDetachedCriteria());
		classe_utenza = new StringExpression("classe_utenza", this.getDetachedCriteria());
		citta = new StringExpression("citta", this.getDetachedCriteria());
		indirizzo = new StringExpression("indirizzo", this.getDetachedCriteria());
		outgoing_mail_server = new StringExpression("outgoing_mail_server", this.getDetachedCriteria());
		incoming_mail_serve = new StringExpression("incoming_mail_serve", this.getDetachedCriteria());
		outgoing_port = new IntegerExpression("outgoing_port", this.getDetachedCriteria());
		incoming_port = new IntegerExpression("incoming_port", this.getDetachedCriteria());
	}
	
	public ContattoDetachedCriteria createContattoCriteria() {
		return new ContattoDetachedCriteria(createCriteria("ORM_Contatto"));
	}
	
	public MessaggioDetachedCriteria createMessaggioCriteria() {
		return new MessaggioDetachedCriteria(createCriteria("ORM_Messaggio"));
	}
	
	public Utente uniqueUtente(PersistentSession session) {
		return (Utente) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Utente[] listUtente(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Utente[]) list.toArray(new Utente[list.size()]);
	}
}

